package io;


import java.io.FileOutputStream;
import java.io.ObjectOutputStream;

public class OOSDemo {
    public static void main(String[] args) throws Exception {
        String name="谢添";
        int age=25;
        String gender="男";
        String[]otherInfo={"很严格,很爱学生"};
        Person person = new Person(name, age, gender, otherInfo);

        FileOutputStream fos=new FileOutputStream("./person.obj");
        ObjectOutputStream os=new ObjectOutputStream(fos);
        os.writeObject(person);
        System.out.println("写出完毕");
        os.close();

    }
}
